<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'A strange day',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/04/14.jpg" alt="Green plants" class="framed-centred-image" width="800" height="480"/>
<section id="dreams">
	<h2>Dream journal</h2>
	<p>
		I dreamed I spotted a large lizard at work.
		It was sort of a red-orange colour and had one of those flared head parts at the back of the head.
		I wasn&apos;t clocked in yet and still had some waiting to do, before I could, so I wanted to try to get a good photograph it for my journal.
		For some reason though, I clocked in to take the photo.
		I&apos;m not sure exactly why.
		After clocking in, I saw I&apos;d clocked in an hour and a half early.
		Whatever.
		I was still going to hunt down this lizard.
	</p>
	<p>
		I think I recall I saw it out the window, so out the door I went.
		I was on a mountain, mostly made up of grey rocks just a bit orange from rust, with very little vegetation.
		Every time I got close to it, it ran away.
		At one point, it got up close to some other people, and I yelled over to them to please not try to catch the lizard as I wanted a photo of it on the rocks.
		I thought I got a good photo of it, but when I lowered my camera, which for some reason had a terribly dim screen, I realised I&apos;d photographed one of the people.
		I was embarrassed, as it felt like I was calling them a lizard.
		I apologised, and continued following the lizard, which was fleeing again.
	</p>
	<p>
		I don&apos;t quite recall what, but something made me realise I was dreaming.
		I think I felt my bed against my back or something, but it&apos;s a haze as I write this.
		At first, it was a mild curiosity, and I kept tracking the lizard to try to photograph it.
		I quickly realised that any photo I took wouldn&apos;t actually exist because this was all a dream though, so I just woke myself up instead.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		In one of my courses, I skimmed what I needed to of the reading material to get my discussion post in on time.
		I didn&apos;t actually read through the material though.
		Today, I sat down and tried to read through the material.
		Right off the bat, the material mentions two types of database models.
		One, of course, is the familiar relational model seen in relational database software such as MySQL.
		I&apos;m not very good at using the $a[SQL] relational database software tends to make use of, but I understand the relational model well enough.
		The other model mentioned was the entity-relationship model, which sounds a bit familiar.
		Maybe I&apos;ve studied this and forgotten.
		In any case, understanding the entity-relationship model&apos;s going to be important for the unit assignment, so I was glad it gets mentioned right away.
		It boded well for the chances that the book would cover what I need in the first of the three chapters I&apos;ve got to read.
		Actually looking at the chapter names though, it looked like it might be the third chapter that covers what I need.
	</p>
	<p>
		After reading the first page though, I came across the heading for Chapter 2.
		Um, what?
		So it turns out the numbered &quot;chapters&quot; in the textbook outline are actually the sections.
		Additionally, Chapter 1 is outside the bounds of a section, so I&apos;d ended up skipping it.
		What I&apos;d read was the introduction to Section 1, which wasn&apos;t a part of a chapter.
		So the overwhelming number of pages I thought I needed to get through this week was actually chapters two through ten, plus three introductory sections.
		The actual reading assignment is much shorter.
	</p>
	<p>
		Between the shock of the difference in the reading assignment compared to what I thought it was, the fact that the school&apos;s censorship of me causes me great lethargy, the stress of the lost pay cheque, and the fact that I still haven&apos;t recovered from those two weeks spent overexerting myself, I didn&apos;t feel up to reading any more from the textbook.
		So basically, I got through one page, and that page wasn&apos;t even a part of the reading assignment after all.
		Mostly it was the lethargy, to be honest.
		I&apos;ve gotten nothing done in terms of reading today.
		Hopefully I can stay on task tomorrow.
		It should be easier, with a much less intimidating length of text to manage.
	</p>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			Thank you for the great links!
			I&apos;ll check those out when I have time.
			I&apos;m interested to know if I was right about my thread-locking theory.
		</p>
		<p>
			You make some interesting points about multi-threaded processes.
			I especially appreciated your description of how each thread requires its own stack within the memory address space.
			However, you didn&apos;t really address the question posed by the discussion assignment: how do you deal with race conditions in so-called &quot;critical sections&quot;?
			Context switching does indeed happen between threads (though also between processes), which is exactly the problem here.
			A thread may enter a critical section, then the context gets switched and another thread enters that same critical section while the partially-complete instance of the section is temporarily put on ice.
			What do you do about such cases?
		</p>
	</blockquote>
</section>
<section id="recovery">
	<h2>Recovery</h2>
	<p>
		I&apos;m not entirely over my cold yet, but I&apos;m feeling a whole lot better.
		Much of my leg strength has returned to me as well, so getting to work isn&apos;t difficult any more.
		I figured time passing was helping with both separately, but now that I think on it, perhaps there&apos;s more of a connection.
		As I get more rest, my body is recovering lost energy, which is necessary both for muscular strength and immune system strength.
		Trying to relax more for a while is paying off.
	</p>
</section>
<section id="mobile">
	<h2>A working mobile?</h2>
	<p>
		If you&apos;ve been following my journal, you may recall that over a year ago, my GT-i9100 quit working on me.
		The charging port seemed badly messed up, so a continuous charge wasn&apos;t possible.
		It seemed to have a short in it; not in the cord, but somewhere in the device.
		With the thing accepting and rejecting the charge in quick succession, it wasn&apos;t getting enough power to even counterbalance the power it used just staying powered on.
		If I recall, it may have been possible to charge the thing while it was powered off; that might have been the <strong>*only*</strong> way to get it charged.
		Once charged though, the thing couldn&apos;t <strong>*keep*</strong> a charge.
		And why not?
		Because the screen wouldn&apos;t stop flashing on and off.
		If it would stay off when not in use, it could hold a charge, but it refused to do that.
		And to make matters worse, the screen kept going off while it was in use too, making the thing impossible to get any actual use out of.
		I don&apos;t recall whether screen lock kicked in when it went off, but I think there was a pretty good chance it did.
		In any case, the device was utterly useless, but I didn&apos;t have the heart to throw it out.
		So I cancelled my service and let the thing just stay powered off.
	</p>
	<p>
		I&apos;m not sure why, but I decided to try charging it today and see if it&apos;d actually function now.
		I guess on some level, I wanted to remind myself just how dysfunctional the thing was.
		However, it seemed to charge just fine now.
		I powered it on after a short charge, and it seems to be acting completely normal now.
		I&apos;m not sure what the problem was before.
		Perhaps it had gotten some moisture inside or something, and that wasn&apos;t going to go away any time soon.
		But after being let dry out for over a year, things as fine now.
		Maybe.
		Like I said, I don&apos;t know what&apos;s going on.
		And I&apos;m not sure how long the device will continue to hold out.
	</p>
	<p>
		Of course, it still has the same incredibly-short battery life that it did when I got the thing.
		It might be time to replace the battery.
		When I bought the device, it came with a literally-broken battery, which is still in the device now.
		I found a lot of the battery issues cleared up when I taped closed the crack on the battery&apos;s shell, but it&apos;s likely the break is still responsible for the short battery life.
		Well, the crack and the fact that the manufacturer keeps the details of the how the device functions a secret, preventing third-party operating systems from being able to optimise many of the hardware features correctly, wasting a lot of power.
		The broken battery impacted seemingly unrelated parts of the device&apos;s functionality in the past too, so it could very well be that the device&apos;s obviously-power-related issues from before I quit using it might also be related to the broken battery.
		There&apos;s a battery store whose website claims they carry the battery I need near the hair-removal place.
		Maybe I&apos;ll see if they really do have one while I&apos;m in the area for my next appointment in about three weeks.
		That&apos;ll give me plenty of time to think about whether splurging on a battery&apos;s a good idea or not.
	</p>
	<p>
		At work, I found the device still seemed to remember what music it was last playing, though I certainly don&apos;t.
		It started by playing the end of <a href="https://professorshyguy.bandcamp.com/track/npc">Professor Shyguy&apos;s NPC</a>, then continued playing a mix of songs by <a href="https://professorshyguy.bandcamp.com/">Professor Shyguy</a> and <a href="https://www.joshwoodward.com/">Josh Woodward</a>.
		It was a good combination for today, and combined with my improved physical well-being, put me in pretty high spirits.
	</p>
	<p>
		It seems I messed up when I set the date and time on the device though.
		Now my photos say they were taken next year.
		I&apos;ve had to set the date so many times on the other camera, due to it being unable to hold a date and time now for some reason, that I&apos;ve started getting careless with my date-setting.
	</p>
</section>
<section id="customer">
	
	<p>
		After helping a customer at the drive-through window, they suddenly asked me &quot;You really don&apos;t like your job, do you?&quot;.
		That caught me off-guard.
		Instead of a real response, I just asked &quot;What?&quot;.
		They replied &quot;Your customer service is terrible.&quot;, then sped off before I could even process what they&apos;d said enough to ask in what way they meant and what they think I should improve.
		Um.
		What?
		I was very polite as always.
		I gave them everything they&apos;d asked for.
		I told them to have a great day after handing over their food.
		What about my customer service was off?
		And I must hate my job?
		I mean, I do hate my job.
		Don&apos;t get me wrong.
		But I don&apos;t let the customers see that.
		And I&apos;d been in a great mood.
		I&apos;d actually gotten lost in what I was doing and forgotten about my problems for a bit.
		I was smiling, including at the customer.
	</p>
	<p>
		The only thing I can think is that I didn&apos;t thank them for their business.
		I don&apos;t really do that.
		Maybe they wanted me to?
		But even then, failing to thank your customers does not poor customer service make.
		This was a mutual exchange though.
		We want their money, but they want our pizzas.
		And we&apos;ve got the cheapest ready-made pizzas in town.
		They&apos;re not going out of their way to throw money at us.
		Sure, I guess it&apos;d be a pleasant gesture to thank each customer for their patronage, but it&apos;d be incredibly conceited for them to think we owe them that.
	</p>
	<p>
		I tried not to let the exchange get me down.
		I try, in general, not to let customers get me down, ever since this one time when one did their best to ruin my day.
		I wouldn&apos;t break the rules for them, and that pissed them off.
		It got me down until I realised that&apos;s exactly what they wanted.
		I was letting a rude customer get their way at my expense, and I decided right then and there not to allow that garbage any more.
		But this customer wasn&apos;t trying to get me down.
		They, as far as I could tell, thought I&apos;d done something wrong, and were offended in some way.
		And they hadn&apos;t really lashed out at me, I mean not really.
		Not like some customers do.
		Without them actually lashing out, I couldn&apos;t write them off.
		My thoughts kept going back to them and I kept trying to figure out what I&apos;d done to offend them.
		Admittedly, I don&apos;t take well to idiocy, so when customers start acting like idiots, my customer service falters.
		If you give me idiocy, I will wad your idiocy up into a ball and throw it back in your face.
		I&apos;m not taking that crap.
		But this customer hadn&apos;t done anything stupid, so I kept up my usual level of service.
	</p>
	<p>
		Eventually, I came to the realisation that I just can&apos;t please everyone.
		Most return customers, if they comment on my customer service at all, tell me I&apos;m always polite.
		Others tell me I always seem to be cheery.
		The funny thing is I&apos;m often not cheery, but I don&apos;t show my customers how terrible I feel.
		I can keep a happy face and I can do my job just fine.
		I&apos;m not sure what this customer thought I&apos;d done wrong, but they forfeited their chance to get me to fix it when they sped off without telling me what was even wrong.
	</p>
</section>
END
);
